/*
 * @Author: smartsf 
 * @Date: 2023-01-06 14:30:13
 * @Last Modified by: smartsf
 * @Last Modified time: 2023-01-06 14:30:13
 */
const AUTH_TOKEN = 'mini_storage_token';
const USER_INFO = 'mini_storage_userInfo';

// token
export function setToken (value) { return uni.setStorageSync(AUTH_TOKEN, value) };
export function getToken () { return uni.getStorageSync(AUTH_TOKEN) };
export function removeToken () { return uni.removeStorageSync(AUTH_TOKEN) };

// userInfo
export function setUserInfo (value) { return uni.setStorageSync(USER_INFO, JSON.stringify(value)) };
export function getUserInfo () { return JSON.parse(uni.getStorageSync(USER_INFO) || '{}') };
export function removeUserInfo () { return uni.removeStorageSync(USER_INFO) };

// 消除所有
export function clearAllStorage () { return uni.clearStorageSync() };

